package com.zky.common.exception;

/**
 * @Description BizCodeEnum
 * @Author 张开源
 * @Date 2022/11/21 16:26
 * @Version 1.0
 **/
public enum BizCodeEnum {
    SMS_CODE_EXCEPTION(10000, "验证码频率太高，请稍后再试"),
    USER_EXIST_EXCEPTION(10001, "用户已经存在"),
    PHONE_EXIST_EXCEPTION(10002, "手机号已经存在"),
    USER_LOGIN_EXCEPTION(10003, "用户名或者密码错误，登陆失败"),
    NO_STOCK_EXCEPTION(10004, "商品库存不足"),
    TO_MANY_REQUEST(10005, "请求流量过大，请稍后再试");

    private final int code;
    private final String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
